home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Utilities / Programming / EnterAct 3.5 / Drag_on Modules / hAWK programs / $TwoColumnsRight < prev    next >
Encoding:
Text File  |  1991-11-03  |  275 b   |  15 lines  |  [TEXT/KEEN]

  1. #Give this program two columns of numbers to work on.
  2.  
  3.     {    one[++n] = $1
  4.         two[n] = $2
  5.         if (w1 < length($1))
  6.             w1 = length($1)
  7.         if (w2 < length($2))
  8.             w2 = length($2)
  9.  
  10.     }
  11. END    {w1 += 2; w2 += 2;
  12.     for (i = 1; i <= n; ++i)
  13.         printf "%" w1 "s" "%" w2 "s\n", one[i], two[i]
  14.     }
  15.